// Copyright (c) 2020 Presto Labs Pte. Ltd.
// Author: leon

#pragma once

#include <iomanip>
#include <sstream>
#include <string>

#include "coin2/base/time.h"
#include "coin2/exchange/feed.pb.h"

struct OpenInterest {
  int64_t timestamp;
  double open_interest_qty;

  void Clear() {
    timestamp = 0;
    open_interest_qty = 0;
  }
};

inline std::ostream& operator<<(
    std::ostream& os,
    const OpenInterest& open_interest) {
  os << "Open Interest ";
  os << "(timestamp=" << open_interest.timestamp;
  os << ",open_interest_qty=";
  os << std::setw(15);
  os << open_interest.open_interest_qty;
  os << ")";
  return os;
}
